<?php
if ( !defined( "IN_UCHOME" ) ) exit( "Access Denied" );
$n = new news;
$data = array();
$mapping = array(
	'同居新闻', '求救信息', '同居事件', '送礼事件','爱情宣言', '买房新闻', '打工赚钱',  '其它事件'
);
for($i=0; $i<8; $i++){
	$data[] = _get_news($i, $n);
}

realname_get();
include_once( template( "house/view/news" ) );

function _get_news($type, &$news)
{
	$temp = query_all("select  * from ".tname("app_love_news")." where type = '{$type}' order by id desc limit 10");
	foreach($temp as $key=>$val){
		$temp[$key]['html'] = $news->display($val);
		$temp[$key]['dateline'] = get_tip($temp[$key]['dateline']);
	}
	return $temp;
}
?>